$('document').ready(function () {
    $('#f').validate(
        {
            rules: {
                "current": {
                    required: true,
                    minlength: 5,
                    maxlength: 15
                },
                "new": {
                    required: true,
                    minlength: 5,
                    maxlength: 15
                },
                "confirm": {
                    equalTo: "#new"
                }
            },
            messages: {
                "current": {
                    required: "Input current password",
                    minlength: "Password must contain 5-15 symbols",
                    maxlength: "Password must contain 5-15 symbols"
                },
                "new": {
                    required: "Input new password",
                    minlength: "Password must contain 5-15 symbols",
                    maxlength: "Password must contain 5-15 symbols"
                },
                "confirm": {
                    equalTo: "Passwords are not equal"
                }
            }
        })
})